|
2020-2021 Sunseeker Telemetry and Lighting System
|
#include "driverlib.h"Go to the source code of this file.
Functions | |
| void | main (void) |
Variables | |
| uint32_t | Result |
| uint16_t | Result_lower16 |
| uint16_t | Result_upper16 |
| void main | ( | void | ) |
Definition at line 70 of file mpy32_ex14_saturationOverflow.c.
References __no_operation(), Result, Result_lower16, and Result_upper16.
| uint32_t Result |
MPY - Saturation Mode Overflow Test
The example illustrates a special case showing overflow. The addition result of 2 positive numbers may exceed the highest positive number (0x7FFF FFFF for 32 bit result) due to overflow indicating a negative result. By having the saturation mode enabled, this result can be truncated off to this highest positive number. Results with and without saturation mode are shown.
ACLK = 32.768kHz, MCLK = SMCLK = default DCO
| / | | |
|---|---|
| – | RST |
| | | |
This example uses the following peripherals and I/O signals. You must review these and change as needed for your own board:
This example uses the following interrupt handlers. To use this example in your own application you must add these interrupt handlers to your vector table.
Definition at line 66 of file mpy32_ex14_saturationOverflow.c.
| uint16_t Result_lower16 |
Definition at line 67 of file mpy32_ex14_saturationOverflow.c.
| uint16_t Result_upper16 |
Definition at line 68 of file mpy32_ex14_saturationOverflow.c.